<!DOCTYPE html>
<html lang="">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <link rel="icon" href="<%= BASE_URL %>favicon.ico">
  <title>
    铃铛VUE3.0模板
  </title>
  <script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.9.0/vconsole.min.js"></script>
  <script>
    // init vConsole 手机页面调试器
    var vConsole = new VConsole();

  </script>
  <script src="./rem.js"></script>
  <script src="./common.js"></script>
  <script>
    var browser = checkVersion();
    var info = {};
    // info.uid = "1650";
    // info.ticket = "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI0MjY5MzEyIiwiY3JlYXRlZCI6MTY0MjY0NDI2ODkxMSwiZXhwIjoxNjQzMjQ5MDY4fQ.ReKXJePvu_T5arfxUgfwf1OTjAaQKd5-_NfRgAYN93Gr6tEgGxl18I8bbyY5SdCchxFQnMk8Q96CGtZFyhFBmQ"
    // info.auth = "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI0MjY5MzEyIiwiY3JlYXRlZCI6MTY0MjY0NDI2ODkxMSwiZXhwIjoxNjQzMjQ5MDY4fQ.ReKXJePvu_T5arfxUgfwf1OTjAaQKd5-_NfRgAYN93Gr6tEgGxl18I8bbyY5SdCchxFQnMk8Q96CGtZFyhFBmQ"
    // localStorage.setItem("info", JSON.stringify(info));


    //手机端获取Token
    if (browser.ios && window.webkit) {
      window.webkit.messageHandlers.getUid.postMessage(null);
      window.webkit.messageHandlers.getTicket.postMessage(null);

    } else if (browser.android) {
      info.uid = parseInt(window.androidJsObj.getUid());
      info.ticket = window.androidJsObj.getTicket();
      info.auth = "Bearer " + info.ticket

      localStorage.setItem("info", JSON.stringify(info));
    }
    var getMessage = function getMessage(key, value) {
      info[key] = value;
      console.log(key, value);
      if (info.uid && info.ticket) {
        info.auth = "Bearer " + info.ticket
        localStorage.setItem("info", JSON.stringify(info));
      }
    };

    //分享开启函数
    // function shareInfo() {

    //   var info = {
    //     title: '铃铛交友年度回忆录', // 分享标题
    //     showUrl: "https://www.cdouyin.com",
    //     imgUrl: 'https://www.cdouyin.com/front/act20201229/logo.png',
    //     desc: '铃铛交友，感恩有你，快登录app查看你的年度回忆录吧~' // 分享描述
    //   };
    //   return JSON.stringify(info);
    // }
  </script>
</head>

<body>
  <noscript>
    <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
        Please enable it to continue.</strong>
  </noscript>
  <div id="app"></div>
  <!-- built files will be auto injected -->
</body>

</html>